package eu.fishcode.android.utils;

import java.io.File;
import java.io.FileFilter;

public class ImageFileFilter implements FileFilter {
	public final String[] imageExtensions = new String[] { "jpg", "png",
			"gif" };

	@Override
	public boolean accept(File file) {
		if (file.isDirectory()) {
			return false;
		}
		for (final String extension : this.imageExtensions) {
			if (file.getName().toLowerCase().endsWith(extension)) {
				return true;
			}

		}
		return false;
	}

}